package com.metel.mservice;

import static org.junit.Assert.*;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;

import com.meterware.httpunit.GetMethodWebRequest;
import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;

public class cxf_init_test {
	
	/**
	 * @uml.property  name="logger"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	final Logger logger = LoggerFactory.getLogger(this.getClass());  
	
	/**
	 * @uml.property  name="wc"
	 * @uml.associationEnd  
	 */
	WebConversation wc; 
	
	@Before
	public void before(){
		wc = new WebConversation(); 
	}

	@Test
	public void test() throws IOException, SAXException {
		String url = "http://localhost:9090/mservice/ws/foobar/";
		url += "is_test goog shot !!! ";
		
		WebRequest req= new GetMethodWebRequest(url);
		WebResponse response = wc.getResponse(req); 
		logger.info("res **********  " + response.getText());
		assertNotNull(response.getText()); 
	}

}
